// 源插件
import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import moment from 'moment';
import router from 'umi/router';
import { StrToDate, GetDateThreeExcel, GetDateThree } from '@/function';

// 视图插件
import {
  Checkbox,
  BackTop,
  Empty,
  Spin,
  Row,
  Col,
  Card,
  Form,
  Input,
  Select,
  Icon,
  Button,
  Dropdown,
  Menu,
  InputNumber,
  DatePicker,
  Modal,
  message,
  Badge,
  Divider,
  Steps,
  Radio,
} from 'antd';

// 外部组件
import UploadExcel from '@/components/Upload/UploadExcel';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
// import PositionRuiOptionsTable from "./PositionRuiOptionsTable";

// css OR less预编译器

// 算式
import _pull from 'lodash/pull';

/**
 *  Describe:数据连接
 *  Created by xjc on 2019/5/15
 */

@connect(({ cpb, loading }) => ({
  cpb,
  loading: loading.models.cqbRule,
}))
@Form.create()
class Upload extends PureComponent {
  componentWillMount() {}

  /**
   *  Describe:当前状态
   *  Created by xjc on 2019/5/15
   */

  state = {};

  readMail() {
    const { dispatch } = this.props;

    dispatch({
      type: 'cpb/StartReadCpbMail',
    });
  }

  /**
   *  Describe:视图
   *  Created by xjc on 2019/5/15
   */

  render() {
    const {} = this.props;
    const { select, select2 } = this.state;

    return (
      <PageHeaderWrapper title="花旗邮件读取">
        <Card>
          <Button onClick={this.readMail.bind(this)} type="primary">
            邮件读取
          </Button>
        </Card>
      </PageHeaderWrapper>
    );
  }

  componentDidMount() {
    const { dispatch } = this.props;
  }

  componentWillUnmount() {}
}

export default Upload;
